home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
earcd
/
dev
/
gcc
/
ixemulsd.lha
/
include
/
ix_amiga.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-12-11
|
3KB
|
90 lines
#ifndef __IX_AMIGA_H
#define __IX_AMIGA_H
/* This header provides prototypes for Amiga specific functions available
* in ixemul.library or libc.a.
*
* Each function is also documented in this header (or will be). Sometimes an Amiga
* extension is described here, but for ease of use the original prototype
* or macro is defined elsewhere.
*
*/
/* Like vfork(), but the memory that the child allocates will be owned by
the child. vfork() uses the parent's memory list, but since vfork2() is
used as a fork() emulation, this would be undesirable, not in the least
because that memory wouldn't be released until the parent exits. Causing
a huge memory leak. */
int vfork2(void);
/* Obsolete function to pass pointers to the _ctype_ array and the sys_nerr
variable from ixemul to the program. Do not use, use ix_get_vars2()
instead. */
/* void ix_get_vars(char **ctype, int *_sys_nerr); */
void ix_get_vars2 (int argc, char **ctype, int *_sys_nerr,
struct Library **sysbase, struct Library **dosbase,
FILE ***fpp, char ***environ_out, char ***environ_in,
int *real_errno, int *real_h_errno, struct __res_state *_res,
int *_res_socket);
/*
* This is a wrapper intended to make life just a little bit easier for those
* who need to use the vfork2()/vfork_resume() trick. It replaces the old
* 'ix_resident()/ix_get_vars2()' pair.
*/
void vfork_setup_child (void);
/*
* This is an implementation extension to the `real' vfork2(). Normally you
* can only cause the parent to resume by calling _exit() or execve() from
* the child. Since I can't provide a real fork() on the Amiga, this function
* is a third possibility to make the parent resume. You have then two
* concurrent processes sharing the same frame and global data... Please be
* EXTREMELY careful what you may do and what not. vfork2() itself is a hack,
* this is an even greater one...
*
* DO NOT use this function in combination with vfork(), or you'll get a big
* memory leak. Only use it with vfork2().
*/
void vfork_resume (void);
#if 0
/* TODO */
use geta4 in callbacks installed using funopen() when -resident
SYSTEM_CALL (CreateExtIO, 27)
SYSTEM_CALL (CreatePort, 28)
SYSTEM_CALL (CreateStdIO, 29)
SYSTEM_CALL (CreateTask, 30)
SYSTEM_CALL (DeleteExtIO, 31)
SYSTEM_CALL (DeletePort, 32)
SYSTEM_CALL (DeleteStdIO, 33)
SYSTEM_CALL (DeleteTask, 34)
O_CASE
achmod
__amiga_filehandle
ix_resident
ix_geta4
ix_check_cpu
tracecntl
SYSTEM_CALL (ix_get_gmt_offset, 473)
SYSTEM_CALL (ix_set_gmt_offset, 474)
SYSTEM_CALL (ix_get_default_settings, 475)
SYSTEM_CALL (ix_get_settings, 476)
SYSTEM_CALL (ix_set_settings, 477)
SYSTEM_CALL (__init_stk_limit, 480)
SYSTEM_CALL (__stkovf, 481)
SYSTEM_CALL (__stkext, 482)
SYSTEM_CALL (__stkext_f, 483)
SYSTEM_CALL (__stkrst, 484)
aselect
ix_get_variables
#endif
#endif